import request from '@/utils/request'

// 查询代理人功能列表
export function listAgent(query) {
  return request({
    url: '/basics/miniagent/list',
    method: 'get',
    params: query
  })
}

// 查询代理人功能详细
export function getAgent(id) {
  return request({
    url: '/basics/miniagent/' + id,
    method: 'get'
  })
}

// 新增代理人功能
export function addAgent(data) {
  return request({
    url: '/basics/miniagent',
    method: 'post',
    data: data
  })
}

// 修改代理人功能
export function updateAgent(data) {
  return request({
    url: '/basics/miniagent',
    method: 'put',
    data: data
  })
}

// 删除代理人功能
export function delAgent(id) {
  return request({
    url: '/basics/miniagent/' + id,
    method: 'delete'
  })
}
